package service.impl;

import enums.LogLevel;
import service.Logger;

/**
 * 控制台日志记录器 - 具体产品
 */
public class ConsoleLogger implements Logger {
    private LogLevel level = LogLevel.INFO;
    
    public ConsoleLogger() {
        System.out.println("初始化控制台日志记录器");
    }
    
    @Override
    public void log(String message) {
        System.out.println("[控制台日志][" + level + "] " + message);
    }
    
    @Override
    public void setLevel(LogLevel level) {
        this.level = level;
    }
    
    @Override
    public LogLevel getLevel() {
        return level;
    }
}